﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using EKETEAM.FrameWork;
using EKETEAM.Data;

namespace EKECMS
{
    public partial class Resume : System.Web.UI.Page
    {
        public eSiteInfo siteinfo = new eSiteInfo();
        public string id = eParameters.QueryString("id");
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Form["act"] != null)
            {
                #region 安全性检查
                if (Request.UrlReferrer == null) Response.End();
                if (Request.Url.Host.ToLower() != Request.UrlReferrer.Host.ToLower() || Request.Url.Port != Request.UrlReferrer.Port) Response.End();
                #endregion
                #region 提交信息
                if (Session["Plugins_RndCode"] == null)
                {
                    Response.Write("<script>alert('验证码超时！');history.back();</script>");
                    Response.End();
                }
                if (Session["Plugins_RndCode"].ToString() != Request.Form["yzm"].ToString())
                {
                    Response.Write("<script>alert('验证码不正确！');history.back();</script>");
                    Response.End();
                }
                eTable tb = new eTable("eWeb_JobResume");

                tb.Fields.Add("SiteID", eBase.getWebSiteID());
                tb.Fields.Add("WebCode", eBase.getWebCode());
                
                tb.Fields.Add("JobID", eParameters.Form("f1"));
                tb.Fields.Add("XM", eParameters.Form("f2"));
                tb.Fields.Add("XB", eParameters.Form("f3"));
                tb.Fields.Add("CSRQ", eParameters.Form("f4"));
                tb.Fields.Add("MZ", eParameters.Form("f5"));
                tb.Fields.Add("ZZMM", eParameters.Form("f6"));
                tb.Fields.Add("ZGXL", eParameters.Form("f7"));
                tb.Fields.Add("JG", eParameters.Form("f8"));
                tb.Fields.Add("BYXX", eParameters.Form("f9"));
                tb.Fields.Add("SXZY", eParameters.Form("f10"));
                tb.Fields.Add("LXDH", eParameters.Form("f11"));
                tb.Fields.Add("DZYJ", eParameters.Form("f12"));
                tb.Fields.Add("DZ", eParameters.Form("f13"));
                tb.Fields.Add("DYYQ", eParameters.Form("f14"));
                tb.Fields.Add("XXJS", eParameters.Form("f15"));
                tb.Add();
                Response.Write("<script>alert('简历投递成功，感谢您的支持!');document.location='" + Request.ServerVariables["HTTP_REFERER"].ToString() + "';</script>");
                Response.End();
                #endregion
            }
           
          //  siteinfo.Title = "投递简历-" + siteinfo.Title;
        }
    }
}